Quantum Drive v0.3.3
------------------
Add-on for Oolite by Giles Williams
Author: Switeck (switeck@hotmail.com)
Version: 0.3.3
Date: August 29, 2023

Overview:
------------
This is an add-on for the Galactic Hyperdrive.
It allows different destinations and allows you to reach "unreachable" systems.

Requires the presence of both a Galactic Hyperdrive and Advanced Navigational Array to function!

The MODE key works with the Quantum Drive equipment now to report the current status of the Galactic Hyperdrive -- whether it's normal, can jump to "unreachable" systems, or fixed coordinates.
This should at least avoid the earlier versions' problem of interfering with mission changes to the Galactic Hyperdrive behavior.


[18:23]	Switeck	Seems my frustrated post about Galactic Hyperdrive behavior may escalate to changes in the fate of the Oolite universe: http://aegidian.org/bb/viewtopic.php?p=147271#p147271
[18:23]	Switeck	If you have a few OXPs installed, what Galactic Hyperdrive does...is almost random.
[18:25]	Wyvern	how abouts placing an plist in overrides that ... hm ... overrides it?
[18:28]	El_Viejo	I'd like to be able to change galdrive behaviour in-game, and enter my chosen co-ords.
[18:30]	Wyvern	better, gameplay wise, would be that only at certain systems galjumps are possible, and lead to defined systems in the next map
[18:31]	Wyvern	or 7 systems in each map that allow jumps to a different map
[18:31]	Wyvern	that would actually make the most sense
[19:18]	Switeck	[18:28] El_Viejo I'd like to be able to change galdrive behaviour in-game, and enter my chosen co-ords. <- I'm working on that.
[19:18]	El_Viejo	Very cool, Switeck.
[19:18]	Wyvern	i would prefer galjumps to be external rather than internal
[19:18]	Switeck	I'll have the OXP ready in a bit...I've been working on it most of this week.
[19:19]	Wyvern	prevent adversaries to jump anywhere into the current chart
[19:19]	Switeck	Quantum Drive v0.1.oxp.zip http://www.mediafire.com/?9mv2h1ht92h7v59
[19:21]	El_Viejo	A new Cobra variant from Solo: http://aegidian.org/bb/viewtopic.php?f=4&p=147412#p147412
[19:21]	Switeck	more details: http://aegidian.org/bb/viewtopic.php?p=147413#p147413
[19:22]	Switeck	I hope 250000 isn't too much for this superjumper
[19:23]	El_Viejo	How does it work in-game?
[19:26]	Switeck	activatable equipment
[19:26]	Switeck	250000 = 25,000.0 credits cost
[19:26]	El_Viejo	25k... re-usable?
[19:26]	Switeck	GH is still used up, but the add-on is reusable.
[19:27]	El_Viejo	Good... that figures.
[19:27]	Switeck	TL 13 and up
[19:28]	El_Viejo	Once again the oxp'ers catch-up with Oofic... cool.
[19:37]	Switeck	It's still in a primitive hack state...no real readme or explanation for how it works
[19:47]	El_Viejo	Cool Switeck... worked a treat, and dropped me nicely into the Cecees/Esusale double. Now if only you could actually enter the co-ords in-game.
[19:47]	Switeck	you just set the jump destination as though you were doing a regular jump
[19:48]	El_Viejo	Ah... in the gal chart?
[19:48]	Switeck	go to the galaxy chart, position the target cursor.
[19:48]	Switeck	yes
[19:48]	El_Viejo	grins hugely
[19:48]	Switeck	The catch is...you can't always go just anywhere
[19:49]	Switeck	you can only go to where there's systems in the CURRENT galaxy...so in the next galaxy it may toss you to a nearby (but wrong!) system
[19:49]	El_Viejo	nods
[19:49]	Switeck	it also has to be reset after each Gal. jump AND on reloading the game.
[19:50]	El_Viejo	No log errors, btw.
[19:50]	Switeck	it has no memory of what it's set to...I don't even know if regular hyperspace jumps reset it.


[quote="Wildeblood"]I want to write a "programmer" for the GalDrive when it is in BEHAVIOUR_FIXED_COORDINATES mode, essentially a menu of interesting destination systems in each galaxy/sector. It should have "explorer" and "military" modes. In the former would be listed the "lost worlds", in the latter the Navy Secom systems.[/quote]
--
Programming in a list of destinations to significant systems for the next jump could be done with a mission menu and/or very long CASE sections in your code. Adding that to Quantum Drive System might be easier than starting from scratch, so go ahead and use that if you want.

I updated Quantum Drive System v0.3
--
[quote="Wildeblood"]Is the current state of galacticHyperspaceBehaviour normally stored in the save-file, or will it have to be stored in a mission variable and reloaded with a startUp function?[/quote]
--
player.ship.galacticHyperspaceBehaviour does not seem to be saved in the save-file.[quote="Wildeblood"]Is it reset by making a galactic jump?[/quote]After 1 Galactic jump, it (seems to...) reverts back to player.ship.galacticHyperspaceBehaviour = "BEHAVIOUR_STANDARD";
...But I don't know what it'll do if planetinfo.plist specifies something other than "BEHAVIOUR_STANDARD".
--
[quote="Wildeblood"]How do I find out the co-ordinates of a system anyway?[/quote]
--
Quantum Drive System v0.3 reports its X, Y Light-Year coordinates target in selected destination mode...although what those numbers mean may only be apparent through trial-and-error.


It's unpolished and is more like Hackers' equipment (from Anarchies OXP) than whatever the Galactic Navy uses to get around fast.
It may stomp all over any mission/campaign OXPs that expect specific galactic jump behavior, but at least it reports what mode it's changing to...which hints what the mode was before.

...It seems the Galactic Hyperdrive behavior is not reset after a Galactic Hyper-jump automatically by Oolite's core logic, so I added a check in this OXP's script to reset it back to normal after the galactic jump.

Installation:
-------------
Drop this oxp in your "AddOns" folder.
For de-installation just remove the oxp from the AddOns folder.

Version history:
-------------------
0.1	Initial testing phase (pre-release)
0.2	Cleaned up logic and better reporting what target coordinates are set to.
0.3	Raised Oolite minimum requirement to v1.79 to use Mode to check Galactic Hyperdrive current settings.
0.3.1 	Typo corrected in v0.3 on this.playerEnteredNewGalaxy section.
0.3.2		Raised Oolite minimum requirement to v1.80 ...due to using special Galactic Hyperdrive destination if doing a scripted misjump...or the Quantum Drive System is equipped but damaged!
0.3.3		Things get WEIRD if you use a scripted misjump with Quantum Drive set to fixed coordinates or all systems reachable mode!

License:
----------
Creative Commons - Attribution-ShareAlike 3.0 United States
http://creativecommons.org/licenses/by-sa/3.0/us/